define(['./config'], () => {
    class Login {
        constructor() {
            this.init()
        }
        init() {
            this.bijiao()
           
           
        }
       bijiao(){
          $('.pass-button').click(()=>{
            let data=localStorage.getItem("info")
            let dat=JSON.parse(data)
            console.log(dat);
            let user = $(".input-userName").val()
            let pass = $(".text-input-password").val()
            console.log(dat.username);
            if(user==dat.username&&pass==dat.password){
                alert('登陆成功')
                location.href="http://127.0.0.1:2113/_index.html"
                let list =[{username:user,password:pass}]
                document.cookie=`islogin=${JSON.stringify(list)};path=/`
            }else{
                alert('登陆失败')
            }
          })
       }

    }
    return Login
})